package com.hanamaki.struct;

public class ForDemo02 {

    public static void main(String[] args) {
//         奇数 和偶数的和

        int odd_sum = 0;
        int even_sum = 0;
        for (int i = 0; i <= 100; i++) {
            if (i % 2 == 0) {
                odd_sum += i;
            } else {
                even_sum += i;
            }
        }

        System.out.println(odd_sum);
        System.out.println(even_sum);

    }
}
